package com.samuel;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;

/**
 * @author a neng huang
 * @since 2021-02-25 10:19
 */
// 表示这个是一个eureka的客户端， 其实不加这个注解也可以
@EnableEurekaClient
// 启动DiscoveryClient组件， 获取关于自己在Eureka服务端的信息
@EnableDiscoveryClient
@SpringBootApplication
public class OrderApplication extends SpringBootServletInitializer {


    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        setRegisterErrorPageFilter(false);
        return super.configure(builder.sources(OrderApplication.class));
    }
}
